package com.tom.controller;

import com.tom.domain.User;
import com.tom.fegin.UserFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignController {
    @Autowired
    private UserFeign userFeign;

    @GetMapping("/getUser/{id}")
    public User getUser(@PathVariable("id") Long id){
        return userFeign.getUser(id);
    }
}
